package traveldream.ejb.DTO;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

public class RegistrationDTO {
	
	@Length(max=31,message = "You have exceded max number of car")
	@Pattern(regexp = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*" +
            "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
            message="invalid email")
    private String idUser;

	@Pattern(regexp = "((?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{5,15})$)",
    message = "invalid password, password must be 5-15 chars long, must contain " +
            "at least one digit and one alphabetic character")
    private String password;

	@Length(max=13,message = "You have exceded max number of car")
    @Pattern(regexp = "(^[0-9]+$)",
            message = "You must specify a Phone Number")
    private String Phone;
    
	@Length(max=31,message = "You have exceded max number of car")
    @Pattern(regexp = "(^[a-zA-Z]+$)",
            message = "You must specify a Address")
    private String Address;
    
	@Length(max=15,message = "You have exceded max number of car")
    @Pattern(regexp = "(^[a-zA-Z]+$)",
            message = "You must specify a surname")
    private String surName;
    
	@Length(max=15,message = "You have exceded max number of car")
    @Pattern(regexp = "([a-zA-Z]+([\\s][a-zA-Z]+)*)",
            message = "You must specify a name")
    private String name;

    public String getIdUser() {
		return idUser;
	}

	public void setIdUser(String idUser) {
		this.idUser = idUser;
	}

	public String getPhone() {
		return Phone;
	}

	public void setPhone(String phone) {
		Phone = phone;
	}

	public String getAddress() {
		return Address;
	}

	public void setAddress(String address) {
		Address = address;
	}

	public String getSurName() {
		return surName;
	}

	public void setSurName(String surName) {
		this.surName = surName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
